package com.gaoyi.crm.vm;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.MutableLiveData;

import com.gaoyi.crm.vm.base.BaseViewModel;

public class MainViewModel extends BaseViewModel {

    MutableLiveData<Integer> fragmentIndex;

    public MainViewModel(@NonNull Application application) {
        super(application);
    }

    public MutableLiveData<Integer> getFragmentIndex() {
        if (fragmentIndex == null) {
            fragmentIndex = new MutableLiveData<>();
        }
        return fragmentIndex;
    }

    public void setFragmentIndex(int index) {
        fragmentIndex.setValue(index);
    }

}
